﻿@using Competition.App.Web.ResultModels.BannerResultModels
@using Competition.Application.Interfaces
@using Competition.Infrastructure.Config
@{
    Layout = "_Layout";
    IBannerService bannerService = this.ViewContext.HttpContext.RequestServices.GetService(typeof(IBannerService)) as IBannerService;
    var v = await bannerService.FindListAsync(1, 10);
    ViewBag.BannerList = v.dtos.Select(dto=>new BannerResultModel()
    {
        Id = dto.Id,
        Url = AppConfig.OtherConfig.AdminUrl + dto.Url,
        Link = dto.Link
    }).ToList();
}
